import allure
from page_object.roncoo_login import RoncooLogin
from page_element.el_settlement import *
import logging
from utils.timer import sleep
from pytest_assume.plugin import assume



class RecnooExamine(RoncooLogin):

    def examine(self):
        # 前置条件：已登录
        self.roncoo_login()
        with allure.step(f"点击结算管理"):
            self.click(recnoo.recnoo_jsgl)
        with allure.step(f"点击结算记录管理"):
            self.click(recnoo.recnoo_jsjl)
        with allure.step(f"点击审核"):
            self.click(recnoo.recnoo_sh)
        with allure.step(f"输入审核备注"):
            self.send_keys(recnoo.recnoo_shbz, '通过')
        with allure.step(f"点击提交按钮"):
            self.click(recnoo.recnoo_shbtn)
        # # 隐式等待---断言
        # self.driver.implicitly_wait(10)
        # with allure.step('验证用户添加成功'):
        #     dy = self.text(recnoo.bank_text)
        #     assume('工商银行' in dy, f"断言失败(验证失败): 期望包含'工商银行'，实际得到'{dy}'")
